package com.sprometheus.config;


import com.sprometheus.core.aspect.GlobalExceptionAspect;
import com.sprometheus.core.handler.SPrometheusHandler;
import com.sprometheus.core.handler.SPrometheusUtil;
import com.sprometheus.event.GlobalExpEventListener;
import com.sprometheus.event.GlobalExpEventPublisher;
import com.sprometheus.strategy.feishu.FeishuStrategy;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@EnableConfigurationProperties({FeishuNoticeProperties.class})
public class SPrometheusAutoConfiguration {

    @Bean
    public FeishuStrategy feishuStrategy() {
        return new FeishuStrategy();
    }

    @Bean
    public GlobalExpEventPublisher globalExpEventPublisher() {
        return new GlobalExpEventPublisher();
    }

    @Bean
    public GlobalExpEventListener globalExpEventListener() {
        return new GlobalExpEventListener();
    }

    @Bean
    public SPrometheusHandler prometheusHandler() {
        return new SPrometheusHandler();
    }

    @Bean
    public GlobalExceptionAspect globalExceptionAspect() {
        return new GlobalExceptionAspect();
    }

    @Bean
    public SPrometheusUtil prometheusUtil() {
        return new SPrometheusUtil();
    }

}
